<?php

class Con_data extends Acan{
	
	public $defaultAct='find';
	function __construct($ainfo=null){
		$this->ctitle = '数据';
		parent::__construct($ainfo=null);
	}
	function Act_find(){
		header('Content-type: text/html; charset=UTF-8');
		$post = $_POST;
		if($post){
			if($post['sign']!='s7ds89dg9hf6z78'){Afun_json('验证错误');}
			$model = Afun_db()->model('acan_data_'.$post['db']);
			if($model){
				$con->limit = 1;
				$con->where = '1';
				if($post['limit']){$con->limit = $post['limit'];}
				if($post['where']){$con->where .= ' AND '.$post['where'];}
				if($post['field']){
					$con->where .= ' AND `'.$post['field'].'`=\''.$post['val'].'\'';
				}
				$rs = $model->ofind($con);
				//$rs = Afun_db()->->query("SELECT * FROM `acan_data_$post[db]` a LEFT JOIN `acan_data_area` ON ");
			}else{
				$rs = '无数据';
			}
			Afun_json($rs);
		}
	}


}

?>